home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Coord / c / RectUnion < prev    next >
Text File  |  1995-07-09  |  1KB  |  30 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Coord.RectUnion.c
  12.     Author:  Copyright © 1994 Tim Browse
  13.     Version: 1.00 (03 Mar 1994)
  14.     Purpose: Find the union of two rectangles.
  15. */
  16.  
  17.  
  18. #include "DeskLib:Core.h"
  19. #include "DeskLib:Wimp.h"
  20. #include "DeskLib:Coord.h"
  21.  
  22.  
  23. extern void Coord_RectUnion(wimp_rect *dest, wimp_rect *src1, wimp_rect *src2)
  24. {
  25.   dest->min.x = MIN(src1->min.x, src2->min.x);
  26.   dest->min.y = MIN(src1->min.y, src2->min.y);
  27.   dest->max.x = MAX(src1->max.x, src2->max.x);
  28.   dest->max.y = MAX(src1->max.y, src2->max.y);
  29. }
  30.